@WIN8_LOOKUP_HEIGHT: 34px;
@WIN8_LOOKUP_LIST_MARGIN_AFTER: 8px;
@WIN8_LOOKUP_VALIDATION_MESSAGE_FONT_SIZE: 14px;
@WIN8_LOOKUP_VALIDATION_MESSAGE_PADDING_HORIZONTAL: 10px;
@WIN8_LOOKUP_VALIDATION_MESSAGE_PADDING_VERTICAL: 12px;
@WIN8_LOOKUP_POPUP_ITEMS_VERTICAL_OFFSET: 30px;

.dx-lookup {
    height: @WIN8_LOOKUP_HEIGHT;
    margin: 4px 0;

    &.dx-state-active {
        background-color: @WIN8_ACCENT_COLOR;
    }
}

.dx-lookup-field {
    height: @WIN8_LOOKUP_HEIGHT;
    min-width: 64px;
    border: 3px solid @WIN8_TEXTEDITOR_BORDER_COLOR;
    font-size: 11pt;
    font-weight: 400;
    line-height: 1.3636;
    color: @WIN8_BASE_TEXT;
    padding: 3px 8px;
}

.dx-lookup-empty {
    .dx-lookup-field {
        color: @WIN8_LABEL_TEXT;
    }
}

.dx-lookup-popup-wrapper {
    background-color: @WIN8_BLACK_COLOR;

    .dx-overlay-content {
        margin: 10% 0;
    }

    .dx-popup-fullscreen {
        margin: 0;
        padding: 0;

        .dx-popup-content {
            margin: 0;

            .dx-lookup-search {
                padding: 0 10px;
            }
        }
    }

    .dx-popup-title + .dx-popup-content {
        top: 40px;
    }

    .dx-popup-bottom {
        margin-bottom: 0;
        height: 59px;
        padding: 8px 10px 0;
    }

    .dx-list {
        padding-top: @WIN8_LOOKUP_POPUP_ITEMS_VERTICAL_OFFSET;
        margin-left: @WIN8_LOOKUP_LIST_MARGIN_AFTER;
        margin-right: @WIN8_LOOKUP_LIST_MARGIN_AFTER;
    }

    .dx-rtl .dx-list {
        margin-right: 0;
        margin-left: @WIN8_LOOKUP_LIST_MARGIN_AFTER;
    }

    &.dx-popover-wrapper {
        .dx-list {
            margin-top: 0;
        }
    }

    .dx-popup-title {
        height: 60px;
    }
}

.dx-lookup-search-wrapper {
    width: auto;

    .dx-list {
        height: calc(~'100%');
    }

    .dx-texteditor-container {
        margin: 0;
    }
}

@media screen and (orientation: portrait) {
    .dx-lookup-popup-wrapper {
        .dx-overlay-content {
            min-width: 100%;

            &:not(.dx-popup-fullscreen) {
                padding: 0;
            }
        }
    }
}

.dx-lookup-popup-wrapper.dx-popover-wrapper .dx-overlay-content {
    padding: 0;
}

.dx-invalid {
    &.dx-lookup {
        .dx-lookup-field {
            border-color: @WIN8_FADED_INVALID_COLOR;
        }

        &.dx-state-focused {
            .dx-lookup-field {
                border-color: @WIN8_INVALID_COLOR;
            }
        }
    }
}

.dx-lookup-arrow {
    width: @DROPDOWNEDITOR_BUTTON_WIDTH;
    .dx-icon-chevronnext;
    .dx-icon-font-centered-sizing(@WIN8_DROPDOWNEDITOR_ICON_SIZE);
    font-weight: bold;
    color: @WIN8_LOOKUP_ARROW_ICON_COLOR;
}

.dx-lookup-validation-message {
    background-color: @WIN8_INVALID_COLOR;
    color: white;
    font-size: @WIN8_LOOKUP_VALIDATION_MESSAGE_FONT_SIZE;
    line-height: @WIN8_LOOKUP_VALIDATION_MESSAGE_FONT_SIZE;
    padding: @WIN8_LOOKUP_VALIDATION_MESSAGE_PADDING_VERTICAL @WIN8_LOOKUP_VALIDATION_MESSAGE_PADDING_HORIZONTAL;
    display: inline-block;
    margin-left: -@WIN8_LOOKUP_VALIDATION_MESSAGE_PADDING_HORIZONTAL;

    .dx-rtl & {
        margin-right: -@WIN8_LOOKUP_VALIDATION_MESSAGE_PADDING_HORIZONTAL;
        margin-left: 0;
    }
}

.dx-popup-content {
    padding: 0;

    &.dx-lookup-invalid {
        padding-top: 0;

        .dx-lookup-validation-message {
            display: inline-block;
        }

        .dx-popup-title + & {
            padding-top: @WIN8_LOOKUP_POPUP_ITEMS_VERTICAL_OFFSET;
        }
    }
}
